using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using TimeTableManagement.Entities;
using TimeTableManagement.Mapping;

namespace TimeTableManagement
{
	public class QLSVContext : DbContext
	{
		static QLSVContext()
		{ 
			Database.SetInitializer<QLSVContext>(null);
		}

		public DbSet<sysdiagram> sysdiagrams { get; set; }
		public DbSet<Tb_Assign_Course> Tb_Assign_Course { get; set; }
		public DbSet<Tb_Config> Tb_Config { get; set; }
		public DbSet<Tb_Course> Tb_Course { get; set; }
		public DbSet<Tb_CourseRegister> Tb_CourseRegister { get; set; }
		public DbSet<Tb_Department> Tb_Department { get; set; }
		public DbSet<Tb_Education> Tb_Education { get; set; }
		public DbSet<Tb_File> Tb_File { get; set; }
		public DbSet<Tb_Log> Tb_Log { get; set; }
		public DbSet<Tb_News> Tb_News { get; set; }
		public DbSet<Tb_People> Tb_People { get; set; }
		public DbSet<Tb_Profile_Value> Tb_Profile_Value { get; set; }
		public DbSet<Tb_Role> Tb_Role { get; set; }
		public DbSet<Tb_Room> Tb_Room { get; set; }
		public DbSet<Tb_Slot> Tb_Slot { get; set; }
		public DbSet<Tb_Slot_Room> Tb_Slot_Room { get; set; }
		public DbSet<Tb_Teachtime> Tb_Teachtime { get; set; }
		public DbSet<Tb_Temp_Finance> Tb_Temp_Finance { get; set; }
		public DbSet<Tb_Timetable> Tb_Timetable { get; set; }
		public DbSet<Tb_Userlogin> Tb_Userlogin { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
		{
            modelBuilder.Conventions.Remove<IncludeMetadataConvention>();
			modelBuilder.Configurations.Add(new sysdiagramMap());
			modelBuilder.Configurations.Add(new Tb_Assign_CourseMap());
			modelBuilder.Configurations.Add(new Tb_ConfigMap());
			modelBuilder.Configurations.Add(new Tb_CourseMap());
			modelBuilder.Configurations.Add(new Tb_CourseRegisterMap());
			modelBuilder.Configurations.Add(new Tb_DepartmentMap());
			modelBuilder.Configurations.Add(new Tb_EducationMap());
			modelBuilder.Configurations.Add(new Tb_FileMap());
			modelBuilder.Configurations.Add(new Tb_LogMap());
			modelBuilder.Configurations.Add(new Tb_NewsMap());
			modelBuilder.Configurations.Add(new Tb_PeopleMap());
			modelBuilder.Configurations.Add(new Tb_Profile_ValueMap());
			modelBuilder.Configurations.Add(new Tb_RoleMap());
			modelBuilder.Configurations.Add(new Tb_RoomMap());
			modelBuilder.Configurations.Add(new Tb_SlotMap());
			modelBuilder.Configurations.Add(new Tb_Slot_RoomMap());
			modelBuilder.Configurations.Add(new Tb_TeachtimeMap());
			modelBuilder.Configurations.Add(new Tb_Temp_FinanceMap());
			modelBuilder.Configurations.Add(new Tb_TimetableMap());
			modelBuilder.Configurations.Add(new Tb_UserloginMap());
		}
	}
}

